/*
 * @Author: wuzhen
 * @Date: 2019-12-03 14:06:15
 * @LastEditors: wuzhen
 * @LastEditTime: 2020-04-18 13:59:01
 * @Description: api接口文件
 */
import http from "./http.js";

// 登录二维码获取
export const getLoginQrcode = data =>
  http("/wpipes/user/preWebLogin", data, "get");
// 查看扫码状态  1已扫描，2同意登录，3拒绝登录， 0准备扫描
export const checkScanStatus = data =>
  http("/wpipes/user/checkScanStatus", data, "get");
// 检查二维码是否登录
export const checkWebLogin = data =>
  http("/wpipes/user/checkWebLogin", data, "get");

// 用户退出登录
export const userLogout = data => http("/wpipes/user/logout", data, "post");

// 消息列表
export const getCountOfflineMessage = data =>
  http("/wpipes/message/countOfflineMessage", data, "get");

// 查询群列表
export const getGroupList = data =>
  http("/wpipes/group/queryGroupList", data, "get");
// 群成员信息
export const getGroupMember = data =>
  http("/wpipes/group/queryGroupMember", data, "get");
// 查询好友列表
export const getFriendShips = data =>
  http("/wpipes/friend/fetchFriendShips", data, "get");
// 查询用户详情
export const getUserInfo = data =>
  http(`/wpipes/user/info/${data.id}`, data, "get");
// 删除好友
export const delFriend = data => http("/wpipes/friend/delFriend", data, "post");
// 修改备注
export const updateFriendname = data =>
  http(
    "/wpipes/friend/updateFriendname",
    { bean: JSON.stringify(data) },
    "post"
  );
